def is_prime(num):
    if num < 2:
        return False
    for i in range(2, int(num ** 0.5) + 1):
        if num % i == 0:
            return False
    return True

def closest_prime(words):
    numbers = {'zero': 0, 'one': 1, 'two': 2, 'three': 3, 'four': 4, 'five': 5, 'six': 6, 'seven': 7, 'eight': 8, 'nine': 9}
    num = 100 * numbers[words[0]] + 10 * numbers[words[1]] + numbers[words[2]]
    
    if 100 <= num <= 999:
        lower = num
        upper = num
        while not is_prime(lower) and not is_prime(upper):
            lower -= 1
            upper += 1
        if is_prime(lower):
            return lower
        else:
            return upper
    else:
        return "Wrong input"

# Примеры использования
print(closest_prime(['one', 'two', 'three']))  # Вывод: 127
print(closest_prime(['nine', 'nine', 'two']))  # Вывод: 991
print(closest_prime(['nine', '9']))  # Вывод: Wrong input